<?php
header("Content-type:text/html;charset=utf-8");
//查看文件内容
$file = $_GET['file'];

switch($_GET['action']){
	case 'show':  
		echo htmlspecialchars(file_get_contents($file));
		break;
	case 'del':
		unlink($file);
		echo "删除成功";
		echo "<script>setTimeout(function(){
			window.history.go(-1);
		},2000);</script>";
		break;
}